package com.sddm.printServer.coder;

import cn.hutool.json.JSONUtil;
import com.sddm.printServer.entiy.CallBack;

import javax.websocket.EncodeException;
import javax.websocket.Encoder;
import javax.websocket.EndpointConfig;

/**
 * @author wyh
 * @version 1.0
 * @date 2022/4/8 23:42
 */
public class CallBackEncoder implements Encoder.Text<CallBack> {
    @Override
    public String encode(CallBack callBack) {
        return JSONUtil.toJsonStr(callBack);
    }

    @Override
    public void init(EndpointConfig endpointConfig) {

    }

    @Override
    public void destroy() {

    }
}
